import {LoginComponent} from "./login/login.component";
import {UserComponent} from "./user.component";
import {RegisterComponent} from "./register/register.component";

export const userRouters = [
  {
    path: '',
    component: UserComponent,
    children: [
      {
        path: '',
        redirectTo: 'login',
        pathMatch: 'full'
      },
      {
        path: 'login',
        //这里对应的是:user.compontent.ts的 <router-outlet></router-outlet>
        component: LoginComponent
      },
      {
        path: 'register',
        component: RegisterComponent
      }
    ],
    //如果要路由到其他module,可以这样写:
    /*
    children:[{
        path:'',
        loadChildren:'../post/post.module#PostModule'
    }]
    */


  }
]
